static void *mkshort_handle;
static char *psn;
+static
+arglist_t csv_args[] = {
+ {"prefer_shortname", &psn, "Use shortnames even when we have longer names available"},
+ {0, 0, 0}
+};
+
#define MYNAME "CSV"
static void
{
file_out = fopen(fname, "w");
- psn = get_option(args, "prefer_shortname");
-
if (file_out == NULL) {
fatal(MYNAME ": Cannot open %s for writing\n", fname);
}
xmap_wr_deinit,
data_read,
data_write,
+ csv_args
};
static int duplicate_shortname = 0;
static int duplicate_location = 0;
+char *snopt;
+char *lcopt;
+
+static
+arglist_t dup_args[] = {
+ {"shortname", &snopt, "Suppress duplicate waypoints based on name"},
+ {"location", &lcopt, "Suppress duplicate waypoint based on coords"},
+ {0, 0, 0}
+};
+
typedef struct btree_node {
struct btree_node *left, *right;
}
void
-duplicate_init(const char *args) {
+duplicate_init(const char *args)
+{
const char *p;
-
- p = get_option(args, "shortname");
- if (p) {
- duplicate_shortname = 1;
- }
- p = get_option(args, "location");
- if (p) {
- duplicate_location = 1;
- }
+ duplicate_shortname = snopt != NULL;
+ duplicate_location = lcopt != NULL;
}
void
-duplicate_deinit(void) {
+duplicate_deinit(void)
+{
}
filter_vecs_t duplicate_vecs = {
printf(" %-20.20s %-50.50s\n",
vec->name, vec->desc);
for (ap = vec->vec->args; ap && ap->argstring; ap++) {
- printf(" %-10.10s %-40.40s\n",
+ printf(" %-18.18s %-50.50s\n",
ap->argstring, ap->helpstring);
}
}